package com.arui.yygh.msm.service.impl;

import com.arui.yygh.msm.service.MsmService;
import com.arui.yygh.msm.utils.MsmUtils;
import com.arui.yygh.vo.msm.MsmVo;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.Map;

@Service
public class MsmServiceImpl implements MsmService {
    @Override
    public boolean send(String phone, String code) {
        if (StringUtils.isEmpty(phone)){
            return false;
        }
        boolean isSend = MsmUtils.sendMsm(code, phone);
        return isSend;
    }

    @Override
    public boolean send(MsmVo msmVo) {
        if (!StringUtils.isEmpty(msmVo.getPhone())){
            boolean isSend = MsmUtils.sendMsm("123456", "13425091819");
            return isSend;
        }
        return false;
    }


}
